@import "variables.less";

@import "variables.less";
/* ======== 自定义组件相关 ======== */

/*面包屑 tab 栏样式*/
.breadcrumb-container {
  .el-tabs {
    .el-tabs__item {
      font-size: @sizeMain !important;
      font-weight: normal;
      height: 50px;
      line-height: 50px;
    }

    .el-tabs__nav-wrap::after {
      display: none !important;
    }
  }

  .el-tabs__header {
    margin: 0 !important;
  }
}

/*公共 table 组件*/
.ez-table-component {
  position: relative;
  background: @colorWhite;

  .table-content {
    border-bottom: 1px solid @colorGray96;

    /*table 组件中文本的配置样式 标题*/

    .table-main-title {
      min-height: @sizeMain;
      line-height: @sizeMain;
      font-size: @sizeMain;
      color: @colorGray10;
    }

    .table-sub-title {
      min-height: @sizeSecond;
      line-height: @sizeSecond;
      font-size: @sizeSecond;
      color: @colorGray70;
    }

    .table-opt-btn {
      color: @colorPrimary;
      font-size: @sizeMain;
      font-weight: bold;
      cursor: pointer;
      padding: 0 !important;
      margin-right: 15px;
    }

    .table-column-dropdown {
      cursor: pointer;
      border-radius: 4px;
      padding: 3px 8px 4px 8px;
    }

    .table-column-dropdown:hover {
      color: @colorPrimary;
      background: @colorBlackAlpha05;
    }

    .el-table {
      .el-table__empty-block {
        display: none !important;
      }
    }
  }

  .table-without-fit {
    .el-table {
      .el-table__body-wrapper {
        height: auto !important;
      }
    }
  }

  .table-pagination {
    .el-pagination {
      .el-pager li {
        height: 30px;
        border-radius: 50% !important;
      }
    }
  }
}

/*表格筛选组件*/
.table-filter-container {
  position: relative;

  .table-filter-header {
    .prepend-icon-active {
      transform: rotate(-90deg);
      transition: all 0.3s;
    }

    .prepend-icon-inactive {
      transition: all 0.3s;
    }
  }

  .table-filter-content {

    .filter-item-label {
      font-size: @sizeMain;
      font-weight: normal;
    }

    .table-filter-number {
      .el-input-number {
        width: 150px !important;
      }
    }

    .table-filter-date-range-comp {

      .table-filter-datetimerange {
        .el-range-editor--small.el-input__inner {
          width: 350px !important;
          padding-right: 5px;
        }
      }

      .table-filter-daterange {
        .el-range-editor--small.el-input__inner {
          width: 250px !important;
          padding-right: 5px;
        }
      }
    }

    .table-filter-cascade {
      .el-cascader {
        width: 220px !important;

        .el-cascader__tags {
          .el-tag {
            //max-width: 145px !important;
          }
        }
      }
    }
  }

  .table-filter-opt-container {
    text-align: right;

    div {
      display: inline-block;
    }

    .table-filter-opt-btn {
      text-align: center;
      font-size: @sizeRegular;
      padding: @paddingSecond !important;
      border: none !important;
      margin-left: @paddingSecond !important;
    }

    .table-filter-opt-btn:hover {
      background: @colorBlackAlpha05 !important;
      color: @colorPrimary !important;
    }

    .table-filter-opt-text-btn {
      font-size: @sizeMain !important;
      padding: 10px @paddingSecond !important;
    }
  }

  .table-filter-popper {
    position: absolute;
    z-index: 2000;
    background: @colorWhite;
    border-radius: @borderRadiusMain;
    border: solid 1px @colorGray90;
    box-shadow: 0 2px 12px 0 @colorBlackAlpha1;
  }

  .table-search-suggest {
    top: 35px;
    left: 0;
    right: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .table-column-control {
    top: 35px;
    right: 0;
    padding: 20px 30px;
    width: 500px;
  }
}

/*级联选择器是弹框形式，所有不能放在 table-filter-container 下面定义*/
.table-filter-cascade-popper {

  .el-cascader-panel {
    border: none !important;
    max-height: 500px;

    .el-cascader-menu {
      border-right: none !important;
      min-width: 218px;

      .el-cascader-menu__wrap {
        height: 100%;
        min-height: 120px;
        overflow-x: hidden;
        overflow-y: auto;
        margin-bottom: 0 !important;

        .el-cascader-menu__list {
          padding: 10px;

          .el-cascader-node {
            padding-left: 5px !important;

            .el-cascader-node__prefix {
              right: 10px !important;
              left: auto;
              font-size: @sizeSecond;
              font-weight: bold;
            }
          }

          .el-cascader-node.in-active-path {
            background: @colorGray98;
          }

          .el-cascader-node:not(.is-disabled):hover,
          .el-cascader-node:not(.is-disabled):focus,
          .el-cascader-node:not(.is-disabled):active {
            background: @colorGray98;
            color: @colorPrimary;
          }
        }
      }
    }
  }
}

/*table中的图片样式*/
.table-cell-image-container {
  white-space: nowrap;
  overflow: auto;
}

/*滚动条样式*/
.table-cell-image-container::-webkit-scrollbar {
  height: 6px;
}

.table-cell-image-container::-webkit-scrollbar-thumb {
  border-radius: @borderRadiusMain;
  -webkit-box-shadow: inset 0 0 5px @colorGray70;
  background: @colorGray70;
}

.table-cell-image-container::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px @colorGray98;
  border-radius: 0;
  background: @colorGray98;
}

.table-cell-image {
  width: 120px;
  height: 100px;
  object-fit: contain;
  border-radius: @borderRadiusSecond;
}

/*表单 提交/取消 按钮样式*/
.form-opt-btn-container {
  .el-button {
    padding-left: @paddingLarge !important;
    padding-right: @paddingLarge !important;
  }
}

// 无 padding 弹框
.dialog-without-padding {
  .el-dialog {
    .el-dialog__body {
      margin: 0 auto;
    }
  }
}

// webIDE 样式
.editor-container {
  .widget-default-state {
    .el-icon-close {
      display: none !important;
    }
  }

  .vdr.active:before {
    outline: none !important;
  }
}

.widget-states-dock, .widget-overview-dock {
  .el-tabs--border-card {
    box-shadow: none !important;
    border: none;

    .el-tabs__item {
      padding: 0 15px !important;
    }

    .el-tabs__new-tab {
      margin: 9px !important;
    }

    .el-tabs__header {
      background: #fff;
    }

    .el-tabs__content {
      padding: 0;
    }
  }

  .el-form-item {
    margin-bottom: 10px;

    .el-form-item__label {
      padding-right: 8px !important;
    }
  }
}

.custom-popover {
  min-width: 100px !important;
  padding: 0 !important;

  .el-form-item {
    margin-bottom: 10px !important;

    .el-form-item__label {
      padding-right: 8px !important;
    }
  }
}

.databind-selector-dialog {
  .el-dialog__body {
    padding: 0 15px 15px 15px !important;

    .el-tabs__item {
      padding: 0 10px !important;
    }
  }
}

.data-binder-table {
  .el-table {
    thead {
      color: @colorGray10 !important;
    }

    th {
      user-select: auto !important;
    }

    td {
      padding: 5px 0 !important;
    }
  }

  .el-table--enable-row-hover .el-table__body tr:hover > td {
    background: @colorWhite !important;
  }
}
